package com.sn.author.service.impl;

import com.alibaba.fastjson.JSON;
import com.sn.author.domain.dto.ImportDTO;
import com.sn.author.service.dao.RemoteService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * @Author xiaom
 * @Date 2020/9/17 16:56
 * @Version 1.0.0
 * @Description <>
 **/
@Service
@Slf4j
public class RemoteServiceImpl implements RemoteService {

    @Async
    @Override
    public void processMessage(ImportDTO vo) {
        try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        log.info("发送消息至云控,参数:{}", JSON.toJSONString(vo));
    }
}
